﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _5
{
    class Program
    {
        static void Main(string[] args)
        {
          
            Console.WriteLine("请输入1到10之间的整数");
            int x = int.Parse(Console.ReadLine());
            int i;
            if (x == 1)
            {
                Console.WriteLine(x + "既不是质数也不是合数");

            }
            else
            {
                for (i = 2; i < x; i++)
                {
                    if (x % i == 0)
                        break;
                }
                if (i < x)
                {
                    Console.WriteLine(x + "为合数");
                }
                else
                {
                    Console.WriteLine(x + "为质数");
                }
            }
            Console.ReadKey();
           
        }
    }
}
